//deck.h
#ifndef _DECK_H
#define _DECK_H

#include "cards.h"
#define MAX 52

class Deck
{
  public:
  Deck(); 
  //constructor for brand new sorted deck
  // Preconditions: 
  // Postconditions: 
  // Exceptions: 
  Deck(int newDeck); //making a temporary deck
  // ~Deck(); //deconstructor for the temporary decks

  void Shuffle();
  // Rearranges the deck in a psuedorandom order
  // Preconditions: the deck has cards in it
  // Postcondition: the deck is rearranged in a psuedorandom order

  Cards* DrawCard();
  // draws a card from the top of the deck and returns it, removing the card from the deck
  // Preconditions: The deck has cards in it
  // Postconditions: The deck is one card smaller and that card is returned

  void InsertRandomly(Cards* cardIn);
  // used to place one card randomly in the deck
  // Preconditions: cardIn is a valid card
  // Postconditions: the deck is one larger, having added CardIn randomly

  Cards ReturnDeck();
  // returns thisDeck
  // Preconditions: none
  // Postconditions: none
 
  void PrintDeck();
  // Prints the whole deck to cout in order with suits and values
  // Preconditions: the deck has cards in it
  // Postconditions: the contents of the deck are printed to the terminal

  void InsertAtBottom(Cards* oneCard); //Function fundamental for the game "War"
  // oneCard is added to the deck at the bottom
  // Preconditions: oneCard is a valid card
  // Postconditions: The deck is one larger and oneCard is inserted to the bottom of the deck

  int Size() const; 
  // returns the number of cards left in the deck
  //Preconditions: none
  //Postconditions: deckIndex is returned

 private:
  Cards* thisDeck[MAX];
  int deckIndex;
};

#endif
